package com.live.countline;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class CountPackage implements CountInterface {

	private List<CountFile> list = new ArrayList<CountFile>();

	public void parseJavaFile(String path) throws IOException {
		File file = new File(path);
		parseJavaFile(file);
	}

	public void parseJavaFile(File file) throws IOException {

	}

	public void println() {
		int totalCode = 0;
		int totalNote = 0;
		System.out.println("total " + list.size()
				+ " files==================================");
		System.out.println("codeLine" + table + "note");

		for (CountFile file : list) {
			totalCode += file.getCodeLine();
			totalNote = file.getNote();
			file.println();
		}
		System.out.println("==============total====================");
		System.out.println(totalCode + table + totalNote);

	}

}
